<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <title>test14 Ajax提交数据</title>
  <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.js"></script>
  <script>
    const users = []
    users.push({username: "张三", age: 1});
    users.push({username: "李四", age: 2});
    users.push({username: "王五", age: 3});

    $.ajax({
      type: "POST",
      url: "${pageContext.request.contextPath}/api/v1/test14",
      data: JSON.stringify(users),
      contentType: "application/json;charset=utf-8"
    });
  </script>
</head>
<body>
<div>
  <h1>Hello World!</h1>
</div>
</body>
</html>
